package com.gjy.spring.controller;

import com.gjy.spring.service.AopService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-03-03 19:19:37
 */
@RequestMapping("/aop")
@RestController
public class AopController {

    @Resource
    private AopService aopService;

    @PostMapping("/test")
    public String test(@RequestBody Map<String, String> map) {
        aopService.updateOrderStatus(map.get("orderNo"), map.get("oldStatus"), map.get("newStatus"));
        return "success";
    }
}
